package com.have.blog.base.wrapper;

public enum ResultCode implements ResponseCode{
    SUCCESS(200, "操作成功"),
    FAILED(410, "系统内部错误"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    VALIDATE_FAILED(404, "参数检验失败"),
    LOGIN_ERROR(405, "账号或者密码错误,错误次数%d"),
    LOGIN_COUNT_ERROR(406, "失败次数过多，账号已被锁定30分钟");

    private int code;
    private String message;

    private ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
